﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="true" assembly="Ghasam.Business" namespace="Ghasam.Business.Domain.Entity">
	<class name="InternalAccounting" table="InternalAccounting">
		<id name="Id" type="Int32" unsaved-value="0">
			<column name="ID" sql-type="int" not-null="true" unique="true" index="ID" />
			<generator class="native" />
		</id>

		<many-to-one class="InternalAccount" name="Account" column="AccountId" />
		<property name="Credit" column="Credit" type="Single" />
		<property name="Debit" column="Debit" type="Single" />
		<many-to-one name="Item" class="Item" column="ItemId" />
		<property name="Quantity" column="Quantity" type="Single" />
		<property name="UnitPrice" column="UnitPrice" type="Single" />
    <property name="InvoiceNumber" column="InvoiceNumber" type="Int64" />
		<many-to-one name="SalesPerson" column="SalesPersonId" class="SalesPerson" />
		<property name="Description" column="Description" not-null="false" type="String" />
		<many-to-one name="AccountingType" column="Type" class="InternalAccountingType" />
		<property name="Paid" type="Boolean" column="Paid" />
    <property name="AccountingDate" type="DateTime" column="AccountingDate" />
		<property name="ModifyStamp" type="DateTime" column="ModifyStamp" />
	</class>
</hibernate-mapping>
